<html>
<head>
    <#include "../../common/head.ftl">
    <script type="text/javascript">
        function delfunc(obj) {
            layer.confirm('确认删除？', {
                    btn: ['确定', '取消'] //按钮
                }, function () {
                    // 确定
                    $.ajax({
                        type: 'post',
                        url: $(obj).attr('data-url'),
                        data: {act: 'del', del_id: $(obj).attr('data-id')},
                        dataType: 'json',
                        success: function (data) {
                            if (data == 1) {
                                layer.msg('操作成功', {icon: 1});
                                $(obj).parent().parent().remove();
                            } else {
                                layer.msg(data, {icon: 2, time: 2000});
                            }
//   						layer.closeAll();
                        }
                    })
                }, function (index) {
                    layer.close(index);
                    return false;// 取消
                }
            );
        }

        function selectAll(name, obj) {
            $('input[name*=' + name + ']').prop('checked', $(obj).checked);
        }

        function get_help(obj) {
            layer.open({
                type: 2,
                title: '帮助手册',
                shadeClose: true,
                shade: 0.3,
                area: ['70%', '80%'],
                content: $(obj).attr('data-url'),
            });
        }

        function delAll(obj, name) {
            var a = [];
            $('input[name*=' + name + ']').each(function (i, o) {
                if ($(o).is(':checked')) {
                    a.push($(o).val());
                }
            })
            if (a.length == 0) {
                layer.alert('请选择删除项', {icon: 2});
                return;
            }
            layer.confirm('确认删除？', {btn: ['确定', '取消']}, function () {
                    $.ajax({
                        type: 'get',
                        url: $(obj).attr('data-url'),
                        data: {act: 'del', del_id: a},
                        dataType: 'json',
                        success: function (data) {
                            if (data == 1) {
                                layer.msg('操作成功', {icon: 1});
                                $('input[name*=' + name + ']').each(function (i, o) {
                                    if ($(o).is(':checked')) {
                                        $(o).parent().parent().remove();
                                    }
                                })
                            } else {
                                layer.msg(data, {icon: 2, time: 2000});
                            }
                            layer.closeAll();
                        }
                    })
                }, function (index) {
                    layer.close(index);
                    return false;// 取消
                }
            );
        }
    </script>
    <meta name="__hash__"
          content="e0ddc55ee02f25b813761d65901c826a_135a051e5c305d464c6ad10e4e1e0163">
</head>
<body style="background-color: #ecf0f5;">

<div class="wrapper">
    <div class="breadcrumbs" id="breadcrumbs">
        <ol class="breadcrumb">
            <li><a href="javascript:void();"><i class="fa fa-home"></i>&nbsp;&nbsp;后台首页</a></li>

            <li><a href="javascript:void();">商品管理</a></li>
            <li><a href="javascript:void();"></a></li>
        </ol>
    </div>

    <section class="content">
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <i class="fa fa-list"></i>库存日志
                    </h3>
                </div>
                <div class="panel-body">
                    <div class="navbar navbar-default">
                        <form id="search-form2" class="navbar-form form-inline"
                              method="post" action="">
                            <div class="form-group">
                                <label for="input-order-id" class="control-label">日志类型:</label>
                                <div class="form-group">
                                    <select class="form-control" id="status" name="mtype">
                                        <option value="">全部</option>
                                        <option value="1">入库</option>
                                        <option value="-1">出库</option>
                                    </select>
                                </div>
                                <label for="input-order-id" class="control-label">商品名称:</label>
                                <div class="input-group">
                                    <input class="form-control" id="input-order-id"
                                           placeholder="商品名称" value="" name="goods_name" type="text">
                                </div>
                                <div class="input-group margin">
                                    <div class="input-group-addon">
                                        日志时间<i class="fa fa-calendar"></i>
                                    </div>
                                    <input id="start_time" value="" name="ctime"
                                           class="form-control pull-right" style="width: 250px;"
                                           type="text">
                                </div>

                            </div>
                            <div class="form-group">
                                <button class="btn btn-primary" id="button-filter search-order"
                                        type="submit">
                                    <i class="fa fa-search"></i> 筛选
                                </button>
                            </div>
                            <input name="__hash__"
                                   value="e0ddc55ee02f25b813761d65901c826a_135a051e5c305d464c6ad10e4e1e0163"
                                   type="hidden">
                        </form>
                    </div>

                    <div id="ajax_return">

                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th class="sorting text-left">编号</th>
                                    <th class="sorting text-left">商品名称</th>
                                    <th class="sorting text-left">商品规格</th>
                                    <th class="sorting text-left">商家名称</th>
                                    <th class="sorting text-left">订单号</th>
                                    <th class="sorting text-left">库存</th>
                                    <th class="sorting text-left">库存类型</th>
                                    <th class="sorting text-left">操作人</th>
                                    <th class="sorting text-left">日志时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>

                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right"></div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<script>
    $(document).ready(function () {
        $('#start_time').daterangepicker({
            format: "YYYY-MM-DD",
            singleDatePicker: false,
            showDropdowns: true,
            minDate: '2016-10-01',
            maxDate: '2030-01-01',
            startDate: '2016-11-01',
            opens: 'right',
            ranges: {
                '今天': [moment(), moment()],
                '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
                '最近7天': [moment().subtract('days', 6), moment()],
                '最近30天': [moment().subtract('days', 29), moment()],
                '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
            },
            locale: {
                applyLabel: '确定',
                cancelLabel: '取消',
                fromLabel: '起始时间',
                toLabel: '结束时间',
                customRangeLabel: '自定义',
                daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
                monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                firstDay: 1
            }
        });
    });
</script>

<div class="daterangepicker dropdown-menu opensright show-calendar"
     style="top: 178px; left: 553.933px; right: auto;">
    <div class="calendar first right">
        <div class="calendar-date">
            <table class="table-condensed">
                <thead>
                <tr>
                    <th class="prev available"><i
                                class="fa fa-arrow-left icon icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>
                    <th colspan="5" class="month"><select class="monthselect">
                            <option
                                    value="10">十一月
                            </option>
                            <option value="11" selected="selected">十二月</option>
                        </select><select
                                class="yearselect">
                            <option value="2016"
                                    selected="selected">2016
                            </option>
                            <option value="2017">2017</option>
                            <option value="2018">2018</option>
                            <option value="2019">2019</option>
                            <option value="2020">2020</option>
                            <option value="2021">2021</option>
                            <option value="2022">2022</option>
                            <option value="2023">2023</option>
                            <option value="2024">2024</option>
                            <option value="2025">2025</option>
                            <option value="2026">2026</option>
                            <option value="2027">2027</option>
                            <option value="2028">2028</option>
                            <option value="2029">2029</option>
                            <option value="2030">2030</option>
                        </select></th>
                    <th class="next available"><i
                                class="fa fa-arrow-right icon icon-arrow-right glyphicon glyphicon-arrow-right"></i>
                    </th>
                </tr>
                <tr>
                    <th>一</th>
                    <th>二</th>
                    <th>三</th>
                    <th>四</th>
                    <th>五</th>
                    <th>六</th>
                    <th>日</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td class="available off in-range" data-title="r0c0">28</td>
                    <td class="available off in-range" data-title="r0c1">29</td>
                    <td class="available off in-range" data-title="r0c2">30</td>
                    <td class="available in-range" data-title="r0c3">1</td>
                    <td class="available in-range" data-title="r0c4">2</td>
                    <td class="available in-range" data-title="r0c5">3</td>
                    <td class="available in-range" data-title="r0c6">4</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r1c0">5</td>
                    <td class="available in-range" data-title="r1c1">6</td>
                    <td class="available in-range" data-title="r1c2">7</td>
                    <td class="available in-range" data-title="r1c3">8</td>
                    <td class="available in-range" data-title="r1c4">9</td>
                    <td class="available in-range" data-title="r1c5">10</td>
                    <td class="available in-range" data-title="r1c6">11</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r2c0">12</td>
                    <td class="available in-range" data-title="r2c1">13</td>
                    <td class="available in-range" data-title="r2c2">14</td>
                    <td class="available in-range" data-title="r2c3">15</td>
                    <td class="available in-range" data-title="r2c4">16</td>
                    <td class="available active end-date" data-title="r2c5">17</td>
                    <td class="available" data-title="r2c6">18</td>
                </tr>
                <tr>
                    <td class="available" data-title="r3c0">19</td>
                    <td class="available" data-title="r3c1">20</td>
                    <td class="available" data-title="r3c2">21</td>
                    <td class="available" data-title="r3c3">22</td>
                    <td class="available" data-title="r3c4">23</td>
                    <td class="available" data-title="r3c5">24</td>
                    <td class="available" data-title="r3c6">25</td>
                </tr>
                <tr>
                    <td class="available" data-title="r4c0">26</td>
                    <td class="available" data-title="r4c1">27</td>
                    <td class="available" data-title="r4c2">28</td>
                    <td class="available" data-title="r4c3">29</td>
                    <td class="available" data-title="r4c4">30</td>
                    <td class="available" data-title="r4c5">31</td>
                    <td class="available off" data-title="r4c6">1</td>
                </tr>
                <tr>
                    <td class="available off" data-title="r5c0">2</td>
                    <td class="available off" data-title="r5c1">3</td>
                    <td class="available off" data-title="r5c2">4</td>
                    <td class="available off" data-title="r5c3">5</td>
                    <td class="available off" data-title="r5c4">6</td>
                    <td class="available off" data-title="r5c5">7</td>
                    <td class="available off" data-title="r5c6">8</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="calendar second left">
        <div class="calendar-date">
            <table class="table-condensed">
                <thead>
                <tr>
                    <th class="prev available"><i
                                class="fa fa-arrow-left icon icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>
                    <th colspan="5" class="month"><select class="monthselect">
                            <option
                                    value="9">十月
                            </option>
                            <option value="10" selected="selected">十一月</option>
                            <option value="11">十二月</option>
                        </select><select class="yearselect">
                            <option
                                    value="2016" selected="selected">2016
                            </option>
                            <option value="2017">2017</option>
                            <option value="2018">2018</option>
                            <option value="2019">2019</option>
                            <option value="2020">2020</option>
                            <option value="2021">2021</option>
                            <option value="2022">2022</option>
                            <option value="2023">2023</option>
                            <option value="2024">2024</option>
                            <option value="2025">2025</option>
                            <option value="2026">2026</option>
                            <option value="2027">2027</option>
                            <option value="2028">2028</option>
                            <option value="2029">2029</option>
                            <option value="2030">2030</option>
                        </select></th>
                    <th class="next available"><i
                                class="fa fa-arrow-right icon icon-arrow-right glyphicon glyphicon-arrow-right"></i>
                    </th>
                </tr>
                <tr>
                    <th>一</th>
                    <th>二</th>
                    <th>三</th>
                    <th>四</th>
                    <th>五</th>
                    <th>六</th>
                    <th>日</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td class="available off" data-title="r0c0">31</td>
                    <td class="available active start-date" data-title="r0c1">1</td>
                    <td class="available in-range" data-title="r0c2">2</td>
                    <td class="available in-range" data-title="r0c3">3</td>
                    <td class="available in-range" data-title="r0c4">4</td>
                    <td class="available in-range" data-title="r0c5">5</td>
                    <td class="available in-range" data-title="r0c6">6</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r1c0">7</td>
                    <td class="available in-range" data-title="r1c1">8</td>
                    <td class="available in-range" data-title="r1c2">9</td>
                    <td class="available in-range" data-title="r1c3">10</td>
                    <td class="available in-range" data-title="r1c4">11</td>
                    <td class="available in-range" data-title="r1c5">12</td>
                    <td class="available in-range" data-title="r1c6">13</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r2c0">14</td>
                    <td class="available in-range" data-title="r2c1">15</td>
                    <td class="available in-range" data-title="r2c2">16</td>
                    <td class="available in-range" data-title="r2c3">17</td>
                    <td class="available in-range" data-title="r2c4">18</td>
                    <td class="available in-range" data-title="r2c5">19</td>
                    <td class="available in-range" data-title="r2c6">20</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r3c0">21</td>
                    <td class="available in-range" data-title="r3c1">22</td>
                    <td class="available in-range" data-title="r3c2">23</td>
                    <td class="available in-range" data-title="r3c3">24</td>
                    <td class="available in-range" data-title="r3c4">25</td>
                    <td class="available in-range" data-title="r3c5">26</td>
                    <td class="available in-range" data-title="r3c6">27</td>
                </tr>
                <tr>
                    <td class="available in-range" data-title="r4c0">28</td>
                    <td class="available in-range" data-title="r4c1">29</td>
                    <td class="available in-range" data-title="r4c2">30</td>
                    <td class="available off in-range" data-title="r4c3">1</td>
                    <td class="available off in-range" data-title="r4c4">2</td>
                    <td class="available off in-range" data-title="r4c5">3</td>
                    <td class="available off in-range" data-title="r4c6">4</td>
                </tr>
                <tr>
                    <td class="available off in-range" data-title="r5c0">5</td>
                    <td class="available off in-range" data-title="r5c1">6</td>
                    <td class="available off in-range" data-title="r5c2">7</td>
                    <td class="available off in-range" data-title="r5c3">8</td>
                    <td class="available off in-range" data-title="r5c4">9</td>
                    <td class="available off in-range" data-title="r5c5">10</td>
                    <td class="available off in-range" data-title="r5c6">11</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="ranges">
        <ul>
            <li>今天</li>
            <li>昨天</li>
            <li>最近7天</li>
            <li>最近30天</li>
            <li>上一个月</li>
            <li class="active">自定义</li>
        </ul>
        <div class="range_inputs">
            <div class="daterangepicker_start_input">
                <label for="daterangepicker_start">起始时间</label><input
                        class="input-mini" name="daterangepicker_start" value=""
                        type="text">
            </div>
            <div class="daterangepicker_end_input">
                <label for="daterangepicker_end">结束时间</label><input
                        class="input-mini" name="daterangepicker_end" value="" type="text">
            </div>
            <button class="applyBtn btn btn-small btn-sm btn-success">确定</button>
            &nbsp;
            <button class="cancelBtn btn btn-small btn-sm btn-default">取消</button>
        </div>
    </div>
</div>
</body>
</html>